<div class="title_mb_bg2">
    <div class="upload_image">
        <ul>
            <li >
                <div class="editable">
                    <span style="width: 80px"> Tên Album :</span>
                    <?php if ($_GET['aid']) { ?>
                        <span >
                            <input style="display: none" type="text" id="album_name" value="<?php echo 'Ngày ' . date('d/m/Y'); ?>" />
                            <select id="album_id" >
                                <?php
                                $rsAlbum = $member->getAllAlbum();
                                while ($row = $db->FetchToArray($rsAlbum)) {
                                    if ($row['id'] == intval($_GET['aid']))
                                        echo '<option value="' . $row['id'] . '" selected>' . $row['name'] . '</option>';
                                    else
                                        echo '<option value="' . $row['id'] . '">' . $row['name'] . '</option>';
                                }
                                ?>
                            </select>
                        </span>

                        <span class="link" ><a href="javascript:void(0)" style="font-weight: normal  <?php if ($db->NumRows($rsAlbum) <= 0)
                                echo ";display:none"; ?>" id="selectAlbum" rel="sl_1">Tạo album mới</a></span>
                                           <?php } else { ?>
                        <input  type="text" id="album_name" value="<?php echo 'Ngày ' . date('d/m/Y'); ?>" />
                        <select style="display: none" id="album_id" >
                            <?php
                            $rsAlbum = $member->getAllAlbum();
                            while ($row = $db->FetchToArray($rsAlbum)) {
                                echo '<option value="' . $row['id'] . '">' . $row['name'] . '</option>';
                            }
                            ?>
                        </select>
                        <span class="link" ><a href="javascript:void(0)" style="font-weight: normal  <?php if ($db->NumRows($rsAlbum) <= 0)
                            echo ";display:none"; ?>" id="selectAlbum" rel="sl_0">Chọn album hiện có</a></span>
                                           <?php } ?>

                </div>
                <div class="readonly" style="display: none">
                    <span style="width: 80px"> Tên Album :</span><label type="text" id="album_name_readonly" ></label>

                </div>
                <div class="right"><input type="file" id="images" /></div>

            </li>

            <li  id="upload_location">
                <div id="imagesList"></div>
                <div class="clear"></div>
                <input type="hidden" id="mid" value="<?php echo $_SESSION['client']['id']; ?>"/>
                <input type="hidden" id="aid" value=""/>
                <input type="hidden" id="member_img_upload_path" value="<?php echo MEMBER_IMG_UPLOAD_PATH . $mid . '/' . date("Y") . '/' . date("m"); ?>"/>
                <div class="">
                    <input type="hidden" id="isUploadImage" value="0"/>
                </div>

                <div class="btn-right-07" >


                    <input type="button" disabled="disabled" class="button_disable left font11px" value="Hoàn thành" name="share_album" id="share_album" >
                </div>
                <div class="btn-right-02">
                    <select data-placeholder="+ thêm nhóm chia sẻ" style="width:600px;" multiple class="chzn-select" id="grp_share" >
                        <option selected value='0'>Bạn cùng quê</option>
                        <optgroup >
                            <?php
                            $rsGroup = $member->getAllGroup();
                            while ($row = $db->FetchToArray($rsGroup)) {
                                echo '<option value=' . $row['id'] . '>' . $row['group_name'] . '</option>';
                            }
                            ?>     
                        </optgroup>
                        <option value='-1'>Mọi người</option>                       
                        <option value=''>Chỉ mình tôi</option>                       
                    </select>

                </div>
                <img src="/images/waiting.gif" style="display:none;margin-right: 10px;margin-top: 5px;vertical-align: middle;float: right" class="loading" >
            </li>
        </ul>
    </div>
</div>
<script type="text/javascript" src="/js/selectbox/chosen.jquery.js"></script>
<script type="text/javascript"> $(".chzn-select").chosen(); </script>
<script src="/js/image.js" type="text/javascript"></script>
